<?php
define('ACTION_GETUSER', 'get');

switch(true){
	case (strcmp($action, ACTION_GETUSER) == 0):
		if(isset($_GET['uid'])){
			$idUser = $_GET['uid'];
			$getUser = $user->getUserFromDB($idUser);
			if(!is_null($getUser)){
				$result = array('status' => NO_ERR, 'result' => $getUser->tojson());
			} else{
				$result = array('status' => ERR_GENERAL);
			}
		} else {
			$result = array('status' => ERR_BAD_PARAMS);
		}	
		break;
	default:
		$result = array('status' => ERR_GENERAL);
}
?>